package title;

/**
 * @author 111
 * @version 1.0
 * @date 2025/4/14 20:00
 * @description
 */
public class Test07 {
    public void test01(){
        String password = "DongLi1JieDian2";

        char[] arr = password.toCharArray();
        int upCount = 0;
        int numCount = 0;
        int lowerCount = 0;
        for (int i = 0; i < arr.length; i++) {
            if(arr[i]>='A' && arr[i]<='Z'){
                upCount++;
            }else if(arr[i]>='a' && arr[i]<='z'){
                lowerCount++;
            }else if(arr[i]>='0' && arr[i]<='9'){
                numCount++;
            }
        }
        System.out.print(password+"是否合法：");
        if(password.length() >=9 && upCount>=2 && numCount!=0 && lowerCount!=0){
            System.out.println(true);
        }else{
            System.out.println(false);
        }

    }
}
